package com.mobilesalon.widget.swipe;

import android.app.ListActivity;
import android.os.Bundle;
import android.util.Log;

import com.mobilesalon.widget.picker.R;

public abstract class SwipeListActivity extends ListActivity implements SwipeListener {
	private static final String TAG = SwipeListActivity.class.getName();

	private PanelSwipe panelSwipe;

	public SwipeListActivity() {
		super();

	}

	//
	// Lifecycle
	//
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}

	@Override
	public void onStart() {
		super.onStart();
	}

	@Override
	public void onResume() {
		super.onResume();
	}

	@Override
	public void onContentChanged() {
		super.onContentChanged();
		panelSwipe = (PanelSwipe) findViewById(R.id.swipe_panel);

		if (panelSwipe == null) {
			throw new IllegalStateException("A PanelSwipe mmust be defined in a SwipeActivity");
		}
		panelSwipe.registerSwipeListener(this);
	}

}
